The present invention relates to numerical control method and apparatus for a machine tool or the like, and more particularly to numerical control method and apparatus with a capacity to reduce or smooth over the feedrate difference for each control axis in a machine tool or the like between adjacent blocks of a machining program.
Numerical control (NC) is widely used for controlling the path of movement of the cutting tools of machine tools under machining programs loaded in NC apparatus. The machining program is punched in an NC tape as movement commands or instructions in successive blocks. If each control axis in the machine tool is subjected to a large feedrate change or difference across the junction between one block and a next block when movement commands are executed, the servosystem and drive mechanism for the control axis undergoes a large mechanical shock.
Such a difficulty is particularly problematic with respect to multi-axis numerically controlled machine tools having more than three control axes since it is difficult to achieve quick identification of the control axis which is required to change its feedrate. More specifically, where the successive program blocks contain motion commands for moving the tool by small successive distances, the combined-axis feedrate of the tool is constant and smooth across block-to-block junctions. However, some axes may be subjected to quite a large feedrate change across a certain block-to-block junction.
FIG. 1 of the accompanying drawings illustrates the manner in which the tool undergoes such a feedrate change between adjacent program blocks. As shown in FIG. 1, a NC machining system includes a machine tool 10 and a bed 12 mounted on a foundation in juxtaposed relation. A slide table 14 is slidably mounted on the bed 12 for sliding movement in the direction of the arrow Z (Z-axis). On the table 14, there is rotatably supported a rotary table 16 rotatable in a horizontal plane in the direction of the arrow B by a rotating driver 16A. A workpiece W such as a propeller blade is fixed by an attachment 18 to the rotary table 16.
The machine tool 10 includes a column 22 slidably mounted on a bed 20 fixed to the foundation, the column 22 being slidable in the direction (X-axis) normal to the sheet of FIG. 1 by means of a drive source 20A including a drive motor. The column 22 supports on its front face a support base 26 carrying a spindle head 24 and slidable in the direction of the arrow Y (Y-axis) along slide surfaces 22A, 22B on the column 22. The support base 26 is driven by a feed screw 28 which can be rotated by an Y-axis motor 30 on the top of the column 22.
The spindle head 24 is mounted on the front face of the support base 26 and driven by a hydraulic cylinder 32 for angular movement about a pivot 34 in the direction of the arrow A. A head 38 is mounted on the lefthand end of the spindle head 24 and holds a tool 36 extending downwardly. The head 38 is angularly movable about the axis of the spindle head 24 in the direction of the arrow C through a certain angular range.
The NC machining system has six control axes, i.e., X-axis, Y-axis, Z-axis, and the three axes about which the angular movements A, B, C take place.
It is assumed that the tool 36 moves in the direction of the arrow .circle.1 while being held perpendicularly to the workpiece W in the same. If the feedrate F of the tip of the tool 36 is constant, the support base 26 has to be quickly moved in a negative direction along the Y-axis and the spindle head 24 has to be quickly moved in a negative direction along the axis of the angular movement A for the tool 36 to move around a workpiece corner CNR. This is an example in which some control axes are required to undergo large feedrate changes.
Such quick control axis feedrate changes in a complex curved surface machining cannot be predicted at the stage of preparing the machining program for the workpiece W with the aid of a computer (known as CAD/CAM). The only available measure at the CAD/CAM stage is to reduce the entire feedrate of the tool. This is however disadvantageous in that the overall machining time is increased. Another solution to the problem of large feedrate changes is to reduce the feedrate of each control axis to zero at each block-to-block junction. This proposal also has drawbacks in that the machining time required is long and the tool tends to leave a marking on the machined surface each time it stops at the end of a block, thus failing to finish the workpiece surface well.
For the reasons described above, it has been the present practice to effect interpolation between one block and a following block for feedrate accelaration and deceleration.
FIGS. 2A and 2B diagrammatically show the manner in which such acceleration and deceleration through interpolation are effected. FIGS. 3A and 3B diagrammatically show the manner in which no such acceleration and deceleration are not carried out.
In each of the examples of FIGS. 2A and 2B and FIGS. 3A and 3B, program blocks executed contain the following commands:
______________________________________ G01 G91 X x1 F f (EOB) X x2 (EOB) Y y1 (EOB) M02 (EOB)
G01 represents linear interpolation command, G91 incremental input, and M02 end of program. Since no acceleration and deceleration are performed in FIG. 3A, the resultant feedrates for the X- and Y-axes are the same as originally commanded as shown. However, the actual path of travel of the tool is subject to an error due to a servomotor error as shown in FIG. 3B, the error being proportional to the feedrate F. The drive systems for the X- and Y-axes suffer large mechanical shocks because the commanded feedrates for the X- and Y-axes are required to change in abrupt fall and rise at a time ti+1.
In the example of FIGS. 2A and 2B, however, acceleration and deceleration are effected by way of interpolation, with the result that any mechanical shocks imposed on the X-axis and Y-axis drive systems are reduced and hence the servomotor delay is also reduced. However, the interpolation process causes a delay corresponding to a time constant. More specifically, interpolation to effect acceleration for the Y-axis is started when interpolation to effect deceleration for the X-axis is started at a time tk. As a consequence, there is a time interval (tk-tk+1) during which time the tool is driven simultaneously along the X- and Y-axes. This has led to a shortcoming in that the actual path of travel of the tool deviates from the correct path to be followed.
While the above process of FIGS. 2A and 2B is effective in lowering the mechanical shock impoved on the drive system for one or more control axes at a block-to-block junction in the machining program for a multi-axis machine tool, it fails to essentially solve the problem of reduced machining accuracy.
The inventor has found that a numerically controlled tool can be moved along a commanded path while minimizing mechanical shocks on the drive systems for control axes by extablishing an allowable feedrate differenc setting in terms of a parameter for each control axis between adjacent program blocks, effecting no interpolation-dependent acceleration and deceleration if the feedrate change for each control axis between the blocks does not exceed the allowable feedrate difference setting, and effecting acceleration and deceleration by way of interpolation if the feedrate change is in excess of the allowable feedrate difference setting.